﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ETL.Entity;

namespace ETL.Business.Models
{
    public class ProjectTaskModel
    {
        public TASK ProjectTasks { get; set; }

        /// <summary>
        /// Domain model constructor
        /// </summary>
        /// <param name="projectTasks"></param>
        public ProjectTaskModel(TASK projectTasks)
        {
            this.ProjectTasks = projectTasks;
        }

        /// <summary>
        /// Get task id
        /// </summary>
        public short? TaskId { get { return Convert.ToInt16(this.ProjectTasks.TASK_ID); } }

        /// <summary>
        /// Get category id
        /// </summary>
        //public short? CategoryId { get { return this.ProjectTasks.t_category; } }

        /// <summary>
        /// Get project id
        /// </summary>
        public short? ProjectId { get { return Convert.ToInt16(this.ProjectTasks.GEN_PROJECT_ID); } }

        /// <summary>
        /// Get task description
        /// </summary>
        public string ProjectName { get { return this.ProjectTasks.PROJECT_NAME; } }

        /// <summary>
        /// Get task description
        /// </summary>
        public string TaskName { get { return this.ProjectTasks.TASK_NAME; } }

        /// <summary>
        /// Get task estimated hours
        /// </summary>
        //public float? EstimatedHours { get { return this.ProjectTasks.t_est_hours; } }

        /// <summary>
        /// Get task estimated complete
        /// </summary>
        //public float? EstimatedComplete{ get { return this.ProjectTasks.t_est_comp; } }

        
        /// <summary>
        /// Get the hours to complete of this task
        /// </summary>
        //public double? HoursToComplete
        //{
          //  get { return this.ProjectTasks.t_hours_remaining; }
        //}

        /// <summary>
        /// Estimated modified
        /// </summary>
        /// <returns></returns>
        //public DateTime? EstimatedModified
        //{
        //    get { return this.ProjectTasks.t_est_modified; }
        //}

        /// <summary>
        /// Get started status
        /// </summary>
        //public string Started{ get { return this.ProjectTasks.t_started; } }

        /// <summary>
        /// Display percent complete of this task
        /// </summary>
        //public string DisplayPercentComplete
        //{
         //   get
         //   {
         //       if (this.ProjectTasks.t_est_comp.HasValue)
         //       {
         //           return String.Format("{0:0}", this.ProjectTasks.t_est_comp.Value) + " %";
         //       }
         //       else
         //       {
         //           return null;
         //       }
          //  }
        //}

    }
}
